package ducpham.rogueconsole.mark2;

import java.awt.Graphics2D;

public abstract class ATile implements IRenderable{
	
	public static final int PARAM_CHAR = 1;
	public static final int PARAM_COLOR = 2;

	private boolean changed = true;
	private int x;
	private int y;
	private int width;
	private int height;
	
	public ATile(int x, int y, int width, int height) {
		this.x = x;
		this.y = y;
		this.width = width;
		this.height = height;
	}
	
	@Override
	public void render(Graphics2D g) {
		changed = false;
		g.clearRect(x, y, width, height);
		return;
	}
	
	public boolean change(int param, Object args){		
		changed = true;
		return changed;
	}
	
	public boolean isChanged() {
		return changed;
	}
	
	public int getX() {
		return x;
	}
	
	public int getY() {
		return y;
	}
	
	public int getWidth() {
		return width;
	}
	
	public int getHeight() {
		return height;
	}

}
